
#include "StdAfx.h"
#include "DBError.h"

DBError::DBError(){	
	reset();
}

DBError::~DBError(){
}

void DBError::reset(){
	error_method_ = "";
	error_query_ = "";
	error_msg_ = "";
	error_state_ = "";
	error_code_ = 0;
	
	disconnect_ = false;
}

const char* DBError::getMethod(){
	return error_method_.c_str();
}

const char* DBError::getQuery(){
	return error_query_.c_str();
}

const char* DBError::getMsg( size_t idx ){
	return error_msg_.c_str();	
}

const char* DBError::getState(){
	return error_state_.c_str();
}


int DBError::getErrorCode(){
	return error_code_;
}

size_t DBError::size(){
	return error_msg_.size();
}
